package com.ruoyi.erp.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.erp.mapper.LedyBacFeeMapper;
import com.ruoyi.erp.domain.LedyBacFee;
import com.ruoyi.erp.service.ILedyBacFeeService;

/**
 * 案件费用明细Service业务层处理
 * 
 * @author ztj
 * @date 2023-04-04
 */
@Service
public class LedyBacFeeServiceImpl implements ILedyBacFeeService 
{
    @Autowired
    private LedyBacFeeMapper ledyBacFeeMapper;

    /**
     * 查询案件费用明细
     * 
     * @param id 案件费用明细主键
     * @return 案件费用明细
     */
    @Override
    public LedyBacFee selectLedyBacFeeById(Long id)
    {
        return ledyBacFeeMapper.selectLedyBacFeeById(id);
    }

    /**
     * 查询案件费用明细列表
     * 
     * @param ledyBacFee 案件费用明细
     * @return 案件费用明细
     */
    @Override
    public List<LedyBacFee> selectLedyBacFeeList(LedyBacFee ledyBacFee)
    {
        return ledyBacFeeMapper.selectLedyBacFeeList(ledyBacFee);
    }

    /**
     * 新增案件费用明细
     * 
     * @param ledyBacFee 案件费用明细
     * @return 结果
     */
    @Override
    public int insertLedyBacFee(LedyBacFee ledyBacFee)
    {
        ledyBacFee.setCreateTime(DateUtils.getNowDate());
        return ledyBacFeeMapper.insertLedyBacFee(ledyBacFee);
    }

    /**
     * 修改案件费用明细
     * 
     * @param ledyBacFee 案件费用明细
     * @return 结果
     */
    @Override
    public int updateLedyBacFee(LedyBacFee ledyBacFee)
    {
        ledyBacFee.setUpdateTime(DateUtils.getNowDate());
        return ledyBacFeeMapper.updateLedyBacFee(ledyBacFee);
    }

    /**
     * 批量删除案件费用明细
     * 
     * @param ids 需要删除的案件费用明细主键
     * @return 结果
     */
    @Override
    public int deleteLedyBacFeeByIds(Long[] ids)
    {
        return ledyBacFeeMapper.deleteLedyBacFeeByIds(ids);
    }

    /**
     * 删除案件费用明细信息
     * 
     * @param id 案件费用明细主键
     * @return 结果
     */
    @Override
    public int deleteLedyBacFeeById(Long id)
    {
        return ledyBacFeeMapper.deleteLedyBacFeeById(id);
    }
}
